package com.example.testapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.os.Environment;
import android.widget.Button;
import android.widget.ProgressBar;

import java.io.File;

public class AsynctTaskII extends AppCompatActivity {
    ProgressBar progressBar;
    Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_asynct_task_ii);

        progressBar = findViewById(R.id.progress_bar);
        button = findViewById(R.id.download_bt);

    }

    private void downloadFile(){
        //  在sd卡根目录创建一个名为 ‘yili’文件夹

        String downloadFolderName = Environment.getExternalStorageDirectory()
                + File.separator + "yili";
        File file = new File((downloadFolderName));
        if(!file.exists()){
            file.mkdir();
        }
        /**
         *  生成真正的文件名
         *  并创建File文件
         * */

    }
}